<template>
	<div class="internation4" style=""> 
		<div class="internation4_leftEc">
			<internationEc4ln :zgData="zcockpitData" :ngData="ncockpitData"></internationEc4ln>
		</div>
		<div class="internation4_center">
			<div class="internation4_button" v-for="(item,index) in yearList" :key="index">{{item}}</div>
		</div>
		<div class="internation4_rightEc">
			<internationEc4rn :qgData="qcockpitData"></internationEc4rn>
		</div>
	</div>
</template>

<script>
	
	import internationEc4ln from '../../components/internation/internationEc4ln.vue'
	import internationEc4rn from '../../components/internation/internationEc4rn.vue'
	export default{
		name:'internation4',
		data() {
			return{
				qcockpitData:[],
				zcockpitData:[],
				ncockpitData:[],
				yearList:[]
			}
		},
		mounted() {
			this.getList()
		},
		methods:{
			async getList(){
				var qn = {
					"params": {
						"normGuid": "dda6767d-a2c0-46d4-9800-80781e413c71",
						"fieldList": [{
						            "key":"statictype",
						            "value":"中国-稀土永磁"
						        }]
						}
				};
				const quguo = await this.$api.post('dcockpit/rest/cockpitApi/searchListNormResult', qn)
				let {custom:{result}}={...quguo}
				this.qcockpitData=result.cockpitData
				this.yearList=this.qcockpitData.map(item=>{
					return item.application_date
				})
				
				var zn = {
					"params": {
						"normGuid": "dda6767d-a2c0-46d4-9800-80781e413c71",
						"fieldList": [{
						            "key":"statictype",
						            "value":"浙江-稀土永磁"
						        }]
						}
				};
				const zhejiang = await this.$api.post('dcockpit/rest/cockpitApi/searchListNormResult', zn)
				let {custom:{result:resultZ}}={...zhejiang}
				this.zcockpitData=resultZ.cockpitData
				console.log(this.zcockpitData)
				var nn = {
					"params": {
						"normGuid": "dda6767d-a2c0-46d4-9800-80781e413c71",
						"fieldList": [{
						            "key":"statictype",
						            "value":"宁波-稀土永磁"
						        }]
						}
				};
				const ningbo = await this.$api.post('dcockpit/rest/cockpitApi/searchListNormResult', nn)
				let {custom:{result:resultN}}={...ningbo}
				this.ncockpitData=resultN.cockpitData
			}
		},
		components:{
			internationEc4ln,
			internationEc4rn
		}
	}
</script>
<style type="text/css">
	.internation4{
		width: 409px;
		height: 202px;
		display: flex;
		/* background-color: rgba(3, 16, 38, 0.71); */
	}
	.internation4_leftEc{
		width: 139px;
		height: 202px;
	}
	.internation4_center{
		margin-top: 35px;
		width: 63px;
		height: 145px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	.internation4_button{
		text-align: center;
		width: 63px;
		height: 25px;
		background: #174088;
		border-radius: 13px;
		font-size: 15px;
		font-family: SourceHanSansCN-Regular;
		font-weight: 600;
		line-height: 25px;
		color: #DFF8FF;
	}
	.internation4_rightEc{
		width: 210px;
		height: 202px;
	}
</style>